<?php

class Application_Model_DbTable_PhieuNhapSach extends Zend_Db_Table_Abstract
{

    protected $_name = 'PHIEUNHAPSACH';

    public function getLastInsertId(){
        $select = $this->select();
        $select->from($this->_name,array(new Zend_Db_Expr('max(MaPhieuNhapSach) as MaPhieuNhapSach')));
        $rows = $this->fetchRow($select);
        return ($rows->MaPhieuNhapSach+1);
    }
}

